<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no,viewport-fit=cover">
    <link rel="stylesheet" href="/css/quill.bubble.css"/>
    <link rel="stylesheet" href="/css/quill.core.css"/>
    <link rel="stylesheet" href="/css/quill.snow.css"/>
    <script type="text/javascript" src="/js/stringUtils.js"></script>
</head>
<body>
<div>
    <!--    <p>测试</p>-->
    <p id="page" style="white-space:pre-wrap"></p>
    <script th:inline="javascript">
        // 获取后端传入的值
        let content = [[${content}]];
        // 图片居中
        let temp1 = insertStrBeforeTarget(content, `><img`, ` style='text-align:center' `)
        // 限定图片宽度
        let temp2 = insertStrAfterTarget(temp1, `<img`, ` style='max-width:90%' `)

        // 修改dom元素的值
        let myElement = document.getElementById("page");
        myElement.innerHTML = temp2
    </script>
</div>
</body>
<script>

</script>
</html>